<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>$Title$</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
    <script>
        function a() {
            $.get("${pageContext.request.contextPath}/hello", function (data) {
                let html = "";
                console.log(111)
                for (let i = 0; i < data.length; i++) {
                    html += "<tr>" +
                        "<td>" + data[i].id + "</td>" +
                        "<td>" + data[i].name + "</td>" +
                        "<td>" + data[i].age + "</td>" +
                        "</tr>"
                }
                $("#tbody").html(html);
            })
        }
    </script>
</head>
<body>
<input type="submit" id="check" onblur="a()">
<table>
    <thead>
    <tr>id</tr>
    <tr>年龄</tr>
    <tr>名字</tr>
    </thead>
    <tbody id="tbody">
    </tbody>
</table>
</body>
</html>
